import java.util.*;

public class Ant {
	private int id;
	
	private int antTeam;
	private int posX;
	private int posY;
	private int life;
	
	//constructor
	Ant(int id, int team){
		this.id = id;
		this.life = 100;
		this.posX = 0;
		this.posY = 0;
		this.antTeam = team;
	}
	//set	
	public void setPosX(int i){this.posX = i;}
	public void setPosY(int i){this.posY = i;}
	public void setAntTeam(int i){this.antTeam = i;}
	
	//get	
	public int getId (){return this.id;}
	public int getLife (){return this.life;}
	public int getPosX (){return this.posX;}
	public int getPosY (){return this.posY;}
	
	//public function
	public int fight(){
		//return a number coresponding to the strenght of the knock
		Random generator = new Random();		
		int strength = generator.nextInt(5);
		
		return strength;
	}
	
	public int damage(int x){
		this.life -= x;
		return this.life;
	}
	
}
